package com.situ.tos2024.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.situ.tos2024.util.MyStringUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDate;

/**
 * 功能：用户信息表
 *
 * @author 千堆雪
 * @version 1.0.0
 * <p>
 * created by 千堆雪 on 2024/3/21, last modified by 千堆雪 on 2024/3/21
 */
@Getter
@Setter
@ToString
@JsonIgnoreProperties("handler")
public class UserInfo extends AbstractEntity {
    private String name;//姓名
    private String pinyin;//拼音
    private String pinyinWithoutTones;//无音调拼音
    private String firstName;//名
    private String lastName;//姓
    private String sex;//性别
    private LocalDate birthday;//出生日期
    private Integer height;//身高
    private Float weight;//体重
    private Integer iq;
    private String qq;//qq
    private String wechat;//微信
    private String phone;//电话
    private String email;//电子邮箱
    private Address address;//地址
    private String addressDetail;//地址详情
    private String race;//民族
    private String religion;//信仰，宗教
    private String nationality;//国籍
    private String avatar;//头像url

    /**
     * 获取完整地址
     *
     * @return 完整地址
     */
    public String getFullAddress() {
        return MyStringUtils.toNonNull(address.toString()) + MyStringUtils.toNonNull(addressDetail);
    }
}
